package cn.xawl.gulimall.search.exception;

import cn.xawl.common.exception.BizCodeEnum;
import cn.xawl.common.utils.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author lh
 * @date 2020/08/15 16:17:15
 *
 *
 **/
@RestControllerAdvice
public class EsExceptionHandler {

    @ExceptionHandler(Exception.class)
    public R handleException(Exception e) {
        return R.error(BizCodeEnum.PRODUCT_UP_EXCEPTION.getCode(), e.getMessage());
    }

}
